import 'package:flutter/material.dart';

class TextComp extends StatelessWidget {
  const TextComp({super.key});

  @override
  Widget build(BuildContext context) {
    return const Text(
      '《春宵》 苏轼 \n 春宵一刻值千金，花有清香月有阴。歌管楼台声细细，秋千院落夜沉沉.春宵一刻值千金，花有清香月有阴。歌管楼台声细细，秋千院落夜沉沉。',
      style: TextStyle(
        fontSize: 18,
        fontWeight: FontWeight.bold,
        color: Colors.green,
        // decoration: TextDecoration.underline,
        // fontStyle: FontStyle.italic,
      ),
      textAlign: TextAlign.center,
      // 超出部分省略号显示
      overflow: TextOverflow.ellipsis,
      maxLines: 3,
    );
  }
}
